<!DOCTYPE html>
<html>
<head>
  <title>Mongodbtest</title>
  <%= stylesheet_link_tag "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>
</head>
<body>
<div>
  <div id="top_content">
    <div id="navigation">
      <%= link_to "我的花园", gardens_url %>
    </div>

    <ul id="menu">
     <% if session[:user_id] %>
          <li>
          <%= User.find(session[:user_id]).email %>
            <ul>
              <li><%= link_to "个人设置", user_config_info_config_path  %></li>
                <li><%= link_to "退出", logout_path, method: :delete %></li>
            </ul>
          </li>
      <% else %>
          <li>
          <%= link_to "登录", login_path %>
          </li>
      <% end %>
    </ul>

  </div>
</div>
<%= yield %>

</body>
</html>
